package main

import (
	"fmt"
	"go-demo/08_memCache/cache"

	"time"
)

func main() {
	newMemCache := cache.NewMemCache(1024)

	newMemCache.Set("key", "value-0", time.Minute)
	exists := newMemCache.Exists("key")
	fmt.Println(exists)
	get, _ := newMemCache.Get("key")
	println(get.(string))
	println(newMemCache.MaxMemory)
	println(newMemCache.UsedMemory)

}
